package com.company.工厂模式;

public class Test {
    public static void main(String[] args) {
        Fruit f1 = new FruitFactory().createFruit(1);
        Fruit f2 = new FruitFactory().createFruit(2);
        Fruit f3 = new FruitFactory().createFruit(3);


        //调用具体水果中的方法
        f1.show();
        f2.show();
        f3.show();
    }
}
